projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69ac7f3
)
Cleanup mem leak in geoniche.
author
robertl
<robertl>
Wed, 19 Apr 2006 20:26:31 +0000
(20:26 +0000)
committer
robertl
<robertl>
Wed, 19 Apr 2006 20:26:31 +0000
(20:26 +0000)
geoniche.c
patch
|
blob
|
history
diff --git
a/geoniche.c
b/geoniche.c
index 8e659d2e2d7e06711eb554dd7280b841fa952708..e5bf8e6aa1ebe60ed5b7834a3f39354407401cb7 100644
(file)
--- a/
geoniche.c
+++ b/
geoniche.c
@@
-648,6
+648,7
@@
geoniche_writewpt(const waypoint *wpt)
char *notes;
int id;
time_t tx;
+ char *gs;
if (ct == 0)
{
@@
-684,7
+685,13
@@
geoniche_writewpt(const waypoint *wpt)
else
notes = enscape(wpt->notes);
- notes = xstrappend(notes, geoniche_geostuff(wpt));
+ gs = geoniche_geostuff(wpt);
+ if (gs) {
+ char *newnotes = xstrappend(notes, gs);
+ xfree (notes);
+ xfree (gs);
+ notes = newnotes;
+ }
vdata = (ubyte *) xmalloc(vsize);
if (vdata == NULL)